#ifndef __MD_VER_1_0__
#define __MD_VER_1_0__

#include "model_data.h"

// Interleaved format

//following gl formats....
//can edit later
//MDF_format... 
#define MDF_V2F                            0x2A20
#define MDF_V3F                            0x2A21
#define MDF_C4UB_V2F                       0x2A22
#define MDF_C4UB_V3F                       0x2A23
#define MDF_C3F_V3F                        0x2A24
#define MDF_N3F_V3F                        0x2A25
#define MDF_C4F_N3F_V3F                    0x2A26
#define MDF_T2F_V3F                        0x2A27
#define MDF_T4F_V4F                        0x2A28
#define MDF_T2F_C4UB_V3F                   0x2A29
#define MDF_T2F_C3F_V3F                    0x2A2A
#define MDF_T2F_N3F_V3F                    0x2A2B
#define MDF_T2F_C4F_N3F_V3F                0x2A2C
#define MDF_T4F_C4F_N3F_V4F                0x2A2D

//data structure
typedef struct _MDF_S_T2F_N3F_V3F
{
	float u,v;
	float nx,ny,nz;
	float vx,vy,vz;
}MDF_S_T2F_N3F_V3F;

typedef struct _MDF_S_N3F_V3F
{
	float nx,ny,nz;
	float vx,vy,vz;
}MDF_S_N3F_V3F;

struct MDv1_0_Mesh
{
	char name[0x10];
	char materialName[0x40];	//size keeping static	
	int  dataOffset;			//data offset from model->data
	int  size;
};

class MDVer1_0 : public ModelData
{
public:
	int format;
	int stride;
	int size;
	void *data;
	int totalMeshes;
	MDv1_0_Mesh *meshes;

	MDVer1_0();
	MDVer1_0(void *dataPtr, int dataSize, int f, void *_meshes, int _totalMeshes);
	virtual ~MDVer1_0();

	void CalculateStride();
	
};

//planing to put it in v3d for easy access
//using this way because in furture you may need to use differnet version
//typedef MDVer1_0 MDInterleaved;

#endif //__MD_VER_1_0__
